package org.darkforest.common.services;

import org.darkforest.model.Address;
import org.darkforest.model.Goods;
import org.darkforest.model.Member;
import org.darkforest.model.OrderGoods;
import org.darkforest.vo.AjaxReturnData;

import java.util.List;

/**
 * Created by Administrator on 2017/4/26.
 */
public interface GiftService {

    /**
     * 根据地址接收礼品
     * @param address
     * @param giftCode
     * @param member
     * @return
     */
    AjaxReturnData doReceiveGift(Address address, String giftCode, Member member) throws Exception;

    /****
     * 领取礼品码
     * @param memberId
     * @param orderId
     * @return
     */
    AjaxReturnData reqGiftCode(Integer memberId, Integer orderId) throws Exception;

    /**
     * 判断礼品码是否可以正常使用
     * @param giftCode
     * @return
     */
    boolean checkGiftCodeStatus(String giftCode);

    /**
     * 获取礼品码中的礼品
     * @param giftCode
     * @return
     */
    List<OrderGoods> listGoodsByGiftCode(String giftCode);
}
